package com.netty.rpc.reference;

import com.netty.rpc.service.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;


public class NettyRpcClientTest {

    private static final Logger logger = LogManager.getLogger(NettyRpcClientTest.class);


    public static void main(String[] args) {
        //首先进行配置文件 动态代理的方式调用createProxy
        ReferenceConfig referenceConfig = new ReferenceConfig(ServiceConfig.class);
        TestService testService = (TestService) RpcServiceProxy.createProxy(referenceConfig);
        String result = testService.sayHello("zhangsan");
        logger.info("rpc call finished"+result);
    }

}
